<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddRealTaskIdTaskIdIndexInOrderTaskListTable extends AbstractMigration
{
    public function up()
    {
        $this->table('order_task_list')
            ->addIndex(['real_task_id'], ['name' => 'idx_real_task_id', 'type' => 'normal'])
            ->addIndex(['task_id'], ['name' => 'idx_task_id', 'type' => 'normal'])
            ->save();

    }

    public function down()
    {
        $this->table('order_task_list')
            ->removeIndexByName('idx_real_task_id')
            ->removeIndexByName('idx_task_id')->save();
    }
}
